<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>table</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }

        th,
        td {
            border: 1px solid;
        }
    </style>
</head>

<body>
    <table>
        <caption>独立的表头</caption>
        <colgroup>
            <col width="100px">
            <col width="150px">
            <col width="200px">
            <col width="250px">
        </colgroup>
        <thead>
            <tr>
                <th colspan="4">特殊的表头</th>
            </tr>
            <tr>
                <th>
                    <div>表头1</div>
                </th>
                <th>表头22</th>
                <th>表头2</th>
                <th>表头2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>内容1</td>
                <td>内容2</td>
                <td>内容2</td>
                <td>内容2</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>表尾1</td>
                <td>表尾2</td>
                <td>表尾2</td>
                <td>表尾2</td>
            </tr>
        </tfoot>
    </table>
    <table>
        <caption>独立的表头1</caption>
        <colgroup>
            <col width="100px">
            <col>
            <col width="100px">
            <col>
        </colgroup>
        <thead>
            <tr>
                <th colspan="4">特殊的表头</th>
            </tr>
            <tr>
                <th style="width:20%">
                    <div>表头1</div>
                </th>
                <th>表头2</th>
                <th width="150px" style="width:200px">表头2</th>
                <th width="100px" style="width:200px">表头2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>内容1</td>
                <td>内容2</td>
                <td>内容2</td>
                <td>内容2</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>表尾1</td>
                <td>表尾2</td>
                <td>表尾2</td>
                <td>表尾2</td>
            </tr>
        </tfoot>
    </table>
</body>

</html>